<div class="mat-paginator-container">
  <div class="mat-paginator-page-size" *ngIf="!hidePageSize">
    <div class="mat-paginator-page-size-label">
      {{_intl.itemsPerPageLabel}}
    </div>

    <mat-form-field
      *ngIf="_displayedPageSizeOptions.length > 1"
      class="mat-paginator-page-size-select">
      <mat-select
        [value]="pageSize"
        [aria-label]="_intl.itemsPerPageLabel"
        (selectionChange)="_changePageSize($event.value)">
        <mat-option *ngFor="let pageSizeOption of _displayedPageSizeOptions" [value]="pageSizeOption">
          {{pageSizeOption}}
        </mat-option>
      </mat-select>
    </mat-form-field>

    <div *ngIf="_displayedPageSizeOptions.length <= 1">{{pageSize}}</div>
  </div>

  <div class="mat-paginator-range-actions">
    <div class="mat-paginator-range-label">
      {{_intl.getRangeLabel(pageIndex, pageSize, length)}}
    </div>

    <button mat-icon-button type="button"
            class="mat-paginator-navigation-first"
            (click)="firstPage()"
            [attr.aria-label]="_intl.firstPageLabel"
            [matTooltip]="_intl.firstPageLabel"
            [matTooltipPosition]="'above'"
            [disabled]="!hasPreviousPage()"
            *ngIf="showFirstLastButtons">
      <svg class="mat-paginator-icon" viewBox="0 0 24 24" focusable="false">
        <path d="M18.41 16.59L13.82 12l4.59-4.59L17 6l-6 6 6 6zM6 6h2v12H6z"/>
      </svg>
    </button>
    <button mat-icon-button type="button"
            class="mat-paginator-navigation-previous"
            (click)="previousPage()"
            [attr.aria-label]="_intl.previousPageLabel"
            [matTooltip]="_intl.previousPageLabel"
            [matTooltipPosition]="'above'"
            [disabled]="!hasPreviousPage()">
      <svg class="mat-paginator-icon" viewBox="0 0 24 24" focusable="false">
        <path d="M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z"/>
      </svg>
    </button>
    <button mat-icon-button type="button"
            class="mat-paginator-navigation-next"
            (click)="nextPage()"
            [attr.aria-label]="_intl.nextPageLabel"
            [matTooltip]="_intl.nextPageLabel"
            [matTooltipPosition]="'above'"
            [disabled]="!hasNextPage()">
      <svg class="mat-paginator-icon" viewBox="0 0 24 24" focusable="false">
        <path d="M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"/>
      </svg>
    </button>
    <button mat-icon-button type="button"
            class="mat-paginator-navigation-last"
            (click)="lastPage()"
            [attr.aria-label]="_intl.lastPageLabel"
            [matTooltip]="_intl.lastPageLabel"
            [matTooltipPosition]="'above'"
            [disabled]="!hasNextPage()"
            *ngIf="showFirstLastButtons">
      <svg class="mat-paginator-icon" viewBox="0 0 24 24" focusable="false">
        <path d="M5.59 7.41L10.18 12l-4.59 4.59L7 18l6-6-6-6zM16 6h2v12h-2z"/>
      </svg>
    </button>
  </div>
</div>
